package edu.arizona.sista.learn.activity.model;

import java.util.HashMap;

import edu.arizona.sista.learn.activity.model.args.PredArg;


public class Bindings{

	private HashMap<PredArg, String> bindings;
	
	public Bindings(){
		bindings = new HashMap<PredArg, String>();
	}
	
	public Bindings(Bindings oldBindings){
		bindings = new HashMap<PredArg, String>( oldBindings.bindings );
	}
	
	public String put(PredArg key, String value){
		return bindings.put(key, value);
	}
	
	public String get(PredArg key){
		return bindings.get(key);
	}
	
	public String remove(PredArg key){
		return bindings.remove(key);
	}
	
	public boolean containsKey(PredArg key){
		return bindings.containsKey(key);
	}
	
	public PredArg getKey(PredArg key){
		for( PredArg arg : bindings.keySet() )
			if( arg.equals( key ) )
				return arg;
		
		return null;
	}
	
	public String toString(){
		return bindings.toString();
	}
}
